Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double Axes Support #300

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Double Axes Support #300

wants to merge 3 commits into from

Conversation

schloerke
Copy link
Member

@schloerke schloerke commented May 19, 2019

Fixes #298

Can test with

remotes::install_github("ggobi/ggally#300")
library(ggplot2)
#> Registered S3 methods overwritten by 'ggplot2':
#>   method         from 
#>   [.quosures     rlang
#>   c.quosures     rlang
#>   print.quosures rlang
library(GGally)
#> Registered S3 method overwritten by 'GGally':
#>   method from   
#>   +.gg   ggplot2

ggpairs(
  iris, 
  1:3, 
  upper = list(
    continuous = function(data, mapping, ...) { 
      ggplot(data, mapping) + 
      geom_point() + 
      scale_x_continuous(sec.axis = sec_axis(~.+10)) + 
      scale_y_continuous(sec.axis = sec_axis(~.+10))
    } 
  ) 
) + 
  theme(strip.placement = "outside")

Created on 2019-05-19 by the reprex package (v0.2.1)

@schloerke
Copy link
Member Author

@derekmichaelwright Please let me know how this works for you.

@derekmichaelwright
Copy link

I am using ggmatrix in order to get a second level of facet strips. ggmatrix still appears to get rid of the sec.axis

@derekmichaelwright
Copy link

This still does not work for ggmatrix. I think it is adding the space for the secondary axis but then something deletes it. when I use remotes::install_github("#300") my plots just get some extra white space on the right hand side

@larmarange
Copy link
Contributor

Would be a great feature for 2.1.0

@schloerke schloerke added this to the 2.1.0 milestone Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle secondary Y axis from plots
3 participants